#define _CRT_SECURE_NO_WARNINGS 1
#include "Sort.h"
#include "Stack.h"

void TestInsertSort()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5 };
	printf("InsertSort:   ");
	InsertSort(a, sizeof(a) / sizeof(int));
	PrintSort(a, sizeof(a) / sizeof(int));

}

void TestShellSort()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5 };
	printf("ShellSort:   ");

	ShellSort(a, sizeof(a) / sizeof(int));
	PrintSort(a, sizeof(a) / sizeof(int));
}

void TestHeapSort()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5 };
	printf("HeapSort:   ");

	HeapSort(a, sizeof(a) / sizeof(int));
	PrintSort(a, sizeof(a) / sizeof(int));
}

void TestSelectSort()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5 };
	printf("SelectSort:   ");

	SelectSort(a, sizeof(a) / sizeof(int));
	PrintSort(a, sizeof(a) / sizeof(int));
}

void TestBubbleSort()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5 };
	printf("BubbleSort:   ");

	BubbleSort(a, sizeof(a) / sizeof(int));
	PrintSort(a, sizeof(a) / sizeof(int));
}

void TestQuickSort()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5 };
	printf("QuickSort:   ");

	//QuickSort(a,0, sizeof(a) / sizeof(int)-1);
	//QuickSort_Part(a, 0, sizeof(a) / sizeof(int) - 1);
	QuickSortNonR(a, 0, sizeof(a) / sizeof(int) - 1);
	PrintSort(a, sizeof(a) / sizeof(int));
}

void TestMergeSort()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5 };
	printf("MergeSort:   ");

	//MergeSort(a, sizeof(a) / sizeof(int));
	MergeSortNonR(a, sizeof(a) / sizeof(int));

	PrintSort(a, sizeof(a) / sizeof(int));
}



int main()
{
	TestInsertSort();
	TestShellSort();
	TestHeapSort();
	TestSelectSort();
	TestBubbleSort();
	TestQuickSort();
	TestMergeSort();


	return 0;
}

